import { defineStore } from 'pinia'
import { ref } from 'vue'
import { LayoutApi } from '../apis/layout.ts'

export const useCategoryStore = defineStore('category', () => {
	const categoryList = ref<any>([])
	const getCategoryList = async () => {
		const res = await LayoutApi.GetCategory()
		categoryList.value = res.data.result
	}

	return {
		categoryList,
		getCategoryList,
	}
})
